This page last changed on Mar 14, 2009 by dcameron.

Most build processes interact with external tools that write their output to file (e.g. NUnit, FxCop, or NCover). To make the output of these tools available to CruiseControl.NET to be used in the build process or displayed in the CruiseControl.NET web page or included in CruiseControl.NET emails, these files need to be merged into the CruiseControl.NET integration.

To merge these files, you need to include a File Merge Task in your CruiseControl.NET project. To do so, you need to modify your ccnet.config file as follows:

<cruisecontrol>
   <project name="project">
      ...
      <publishers>
         <merge>
             <files>
                  <file><!-- path to NUnit test file --></file>
                  <file><!-- path to FxCop file --></file>
             </files>
         </merge>
      </publishers>
   </project>
</cruisecontrol>
You should place your File Merge Tasks in the <publishers /> section of your Project Configuration Block before your Xml Log Publisher.
The files processed by File Merge Task must be in XML format.

Modify the contents of the <files> element to contain the path of the files that you wish to merge. The file can be specified using an asterisk ("*") wildcard in order to include multiple files that match the specified pattern (ie. "*-results.xml" will merge all files ending with the suffix "-results.xml"). The asterisk wildcard can only be used in the filename, not in the path.

If a relative <file> location is specified, this is relative to the Project Working Directory.

Why are the merged results not showing up in the Project Report Web Application?

If you have set up the configuration for the File Merge Task as described above and you are still not ending up with the appropriate results showing up within the web application, please try the following steps:

  1. Click the original log link and check to see if the merged content is included in the xml. If it is missing then got onto step 2. If it is present and is still not showing up in the web page then try emailing the CCNet users list .
  2. Have you put the File Merge Tasks in the <publishers /> section of your Project Configuration Block before your Xml Log Publisher?
  3. Check the folder that contains the files that should be merged. If they are not there then you need to dig into your build script to find out why they aren't getting created.
  4. If the files are there but aren't getting merged, double-check your ccnet.config file. Is the configuration specified correctly as specified above? Remember that case matters in XML tag and attribute names.
  5. Check the ccnet.log file. You should see Info-level log messages stating that the files have been merged.
  6. Does the file contain valid XML data? The File Merge Task only expects to process XML files. It will attempt to clean up non-XML files and write errors to the ccnet.log file, but it isn't always successful.
Document generated by Confluence on Mar 14, 2009 02:55